//
// Created by tang on 22-10-24.
//

#ifndef LEARNOPENGL_IMGUI_EXT_HPP
#define LEARNOPENGL_IMGUI_EXT_HPP

#include <glm/glm.hpp>
#include <imgui/imgui.h>

namespace GL {
    class Texture;
}

namespace ImGui {
    bool Vector4Editor(const char *name, glm::vec4 &vec4, const glm::vec4 &reset = glm::vec4{0.f}, float speed = 0.1f);
    bool Vector3Editor(const char *name, glm::vec3 &vec3, const glm::vec3 &reset = glm::vec3{0.f}, float speed = 0.1f);
    bool Vector2Editor(const char *name, glm::vec2 &vec2, const glm::vec2 &reset = glm::vec2{0.f}, float speed = 0.1f);

    bool Vector4Ranged(const char *name, glm::vec4 &vec4, const glm::vec4 &min, const glm::vec4 &max, const glm::vec4 &reset = glm::vec4{0.f}, float speed = 0.1f);
    bool Vector3Ranged(const char *name, glm::vec3 &vec3, const glm::vec3 &min, const glm::vec3 &max, const glm::vec3 &reset = glm::vec3{0.f}, float speed = 0.1f);
    bool Vector2Ranged(const char *name, glm::vec2 &vec2, const glm::vec2 &min, const glm::vec2 &max, const glm::vec2 &reset = glm::vec2{0.f}, float speed = 0.1f);

    void Image(const GL::Texture &tex, ImVec2 size = {0,0});
}

#endif//LEARNOPENGL_IMGUI_EXT_HPP
